﻿using System;

namespace enyo.db8
{
    public class Query
    {
        /// <summary>
        /// Array of property names to return.
        /// </summary>
        public string[] Select;

        /// <summary>
        /// Name of kind to retrieve results from.
        /// </summary>
        public string From;

        /// <summary>
        /// Array of clauses to test.
        /// </summary>
        public WhereClause[] Where;

        /// <summary>
        /// Order results on this property.
        /// </summary>
        public string OrderBy;

        /// <summary>
        /// Return results in descending order.
        /// </summary>
        public bool Desc;

        /// <summary>
        /// Include deleted objects. Deleted objects have _del=true.
        /// Note: You can only request this if the "incDel" field was true when you created your indexes during a "putKind" operation. Otherwise, the query fails with a "no index for this query" message.
        /// </summary>
        public bool IncDel;

        /// <summary>
        /// Specifies maximum number of results to return (0-500). Default is 500.
        /// </summary>
        public int Limit;

        /// <summary>
        /// Page key returned by previous query.
        /// </summary>
        public string Page;
    }
}
